/*
import { Component } from '@angular/core';
import {PickerService} from "./components/picker/picker.service";
import {PickerRef} from "./components/picker/picker-ref.class";
import demoDatas from '../lib/index';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.less']
})
export class AppComponent {
  title = 'zorro-mobile';
  value = [];
  singleArea = [
    '东城区',
    '西城区',
    '崇文区',
    '宣武区',
    '朝阳区',
    '丰台区',
    '石景山区',
    '海淀区',
    '门头沟区',
    '房山区',
    '通州区',
    '顺义区',
    '昌平区',
    '大兴区',
    '平谷区',
    '怀柔区',
    '密云县',
    '延庆县'
  ];
  data = [];
  name = '选择';
  constructor(private _picker: PickerService) {
    // this.data = this.singleArea;
    this.data = demoDatas.district;
  }

  showPicker() {
    const ref: PickerRef = this._picker.showPicker(
      { value: this.value, data: this.data },
      result => {
        console.log(result);
        this.name = this.getResult(result);
        this.value = this.getValue(result);
      },
      cancel => {
        console.log('cancel');
      }
    );
  }

  getResult(result) {
    this.value = [];
    let temp = '';
    result.forEach(item => {
      this.value.push(item.label || item);
      temp += item.label || item;
    });
    return this.value.map(v => v).join(',');
  }

  getValue(result) {
    const value = [];
    let temp = '';
    result.forEach(item => {
      value.push(item.value || item);
      temp += item.value || item;
    });
    return value;
  }
}
*/
